<?php

class Form_Order extends Zend_Form
{

    public function init()
    {
    	$filter_trim = new Zend_Filter_StringTrim();
    	$filter_stripTag = new Zend_Filter_StripTags();
    	$intValidator = new Zend_Validate_Int();
        
        $name = new Zend_Form_Element_Text("name");
        $name->setRequired();
        $name->setLabel("Name: ");
        $name->setRequired(true);
        
        $name->addFilter($filter_stripTag);
        $name->addFilter($filter_trim);
        
        $this->addElement($name, "name");
        
        $email = new Zend_Form_Element_Text("email");
        $email->setRequired();
        $email->setLabel("Email: ");
        $email->setRequired(true);
        
        $email->addFilter($filter_stripTag);
        $email->addFilter($filter_trim);
        
        $this->addElement($email, "email");
        
        $currency = new Zend_Form_Element_Select("currency");
        $currency->setLabel("Currency: ");
        $currency->setRequired();
        
        $currency->addMultiOption("USD", "USD");
        $currency->addMultiOption("EUR", "EUR");
        
        $currency->addFilter($filter_stripTag);
        $currency->addFilter($filter_trim);
        $this->addElement($currency, "currency");
        
        $price = new Zend_Form_Element_Text("price");
        $price->setLabel("Price: ");
        $price->setRequired();
        $price->addFilter($filter_stripTag);
        $price->addFilter($filter_trim);
        $price->addValidator($intValidator);
        $this->addElement($price, "price");
        
        $tell = new Zend_Form_Element_Text("tell");
        $tell->setRequired();
        $tell->setLabel("Tell: ");
        $tell->addFilter($filter_trim);
        $tell->addFilter($filter_stripTag);
        $this->addElement($tell, "tell");
        
        $mobile = new Zend_Form_Element_Text("mobile");
        $mobile->setLabel("Mobile: ");
        //$mobile->setRequired();
        $mobile->addFilter($filter_trim);
        $mobile->addFilter($filter_stripTag);
        $this->addElement($mobile, "mobile");
        
        $state = new Zend_Form_Element_Text("state");
        $state->setLabel("State: ");
        $state->setRequired();
        $state->addFilter($filter_trim);
        $state->addFilter($filter_stripTag);
        $this->addElement($state, "state");
        
        $city = new Zend_Form_Element_Text("city");
        $city->setLabel("City: ");
        $city->setRequired();
        $city->addFilter($filter_trim);
        $city->addFilter($filter_stripTag);
        $this->addElement($city, "city");
        
        $address = new Zend_Form_Element_Text("address");
        $address->setLabel("Address: ");
        $address->setRequired();
        $address->addFilter($filter_trim);
        $address->addFilter($filter_stripTag);
        $this->addElement($address, "address");
        
        $country = new Zend_Form_Element_Text("country");
        $country->setLabel("Country: ");
        $country->setRequired();
        $country->addFilter($filter_trim);
        $country->addFilter($filter_stripTag);
        $this->addElement($country, "country");
        
        $zipcode = new Zend_Form_Element_Text("zipcode");
        $zipcode->setLabel("Zip code: ");
        $zipcode->setRequired();
        $zipcode->addFilter($filter_trim);
        $zipcode->addFilter($filter_stripTag);
        $this->addElement($zipcode, "zipcode");
        
        $receiver = new Zend_Form_Element_Text("receiver");
        $receiver->setLabel("Receiver: ");
        $receiver->setRequired();
        $receiver->addFilter($filter_trim);
        $receiver->addFilter($filter_stripTag);
        $this->addElement($receiver, "receiver");
        
        
        
        
        
        $message = new Zend_Form_Element_Textarea("message");
        $message->setLabel("Message: ");
        $message->setAttrib("rows", "5");
        $message->setAttrib("cols", "80");
        $message->addFilter($filter_trim);
        $message->addFilter($filter_stripTag);
        $this->addElement($message, "message");
        
        
        
        $good_num = new Zend_Form_Element_Text("good_num");
        $good_num->setLabel("Good No. : ");
        $good_num->addFilter($filter_trim);
        $good_num->addFilter($filter_stripTag);
        $this->addElement($good_num, "good_num");
        
       
        
        $submit = new Zend_Form_Element_Submit("submit");
        $submit->setAttrib("onclick", "return confirm('Ready to submit?');");
        $this->addElement($submit, "submit");
        
        
        $artwork_id = new Zend_Form_Element_Hidden("artwork_id");
        $artwork_id->setLabel("ArtworkId: ");
        $artwork_id->setRequired();
        $artwork_id->setRequired(true);
        $intValidator = new Zend_Validate_Int();
        $artwork_id->addValidator($intValidator);
        $this->addElement($artwork_id, "artwork_id");
        
        
       
    }


}

